package ifwhilefor;

import java.util.Scanner;

public class PalindromeNumber2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int number = sc.nextInt(), record = number, bit, new_number = 0;
        do {
            //取num中最后一位的数字
            bit = number % 10;
            //去掉num中最后一位数字
            number /= 10;
            //反向重组
            new_number = new_number * 10 + bit;
        } while (number != 0);
        //对比
        if (new_number != record)
            System.out.println(record + "不是回文数");
        else
            System.out.println(record + "是回文数");
    }
}
